package com.jt.controller;

import com.jt.pojo.User;
import com.jt.service.UserService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


import java.util.List;

@RestController
@RequestMapping("/")
@MapperScan("com.jt.dao")
public class UserController {
    @Autowired
    UserService userService;

    @RequestMapping("/")
    List<User> getall(){
        return userService.findAll();
    }

    @RequestMapping("get")
    String get(){
        return "123";
    }
}
